# include <fcntl.h>
# include <unistd.h>
# include <stdlib.h>
# include <stdio.h>

#define FLAGS O_WRONLY | O_CREAT |O_TRUNC

int main (int argc, char **argv)
{
    int             fd, ctl, i;
    char            buff[52];

    if (argc < 2)
    {
        write (STDOUT_FILENO, "missing an arg\n", 16);
        return -1;
    }

    if ( 0 > (fd=open(argv[1], FLAGS, 0666)) )
    {
        perror ("open");
        return -1;
    }

    for (i = 0; i < 26; i++) buff[i] = 'A'+i;
    for (i = 0; i < 26; i++) buff[i+26] = 'a'+i;

    if ( 0 > (ctl = write (fd, buff, 52)))
            perror ("write");

    while (-1 == close(fd));

    return 0;

}
